/* 
 * File:   JEpoll.h
 * Author: johnneyshi
 *
 * Created on 2013年3月3日, 下午12:21
 */

#ifndef JEPOLL_H
#define	JEPOLL_H
#include <vector>
#include <sys/epoll.h>

class JEpoll {
public:
    JEpoll();
    void Create(int fdCount);
    void AddFd(int fd);
    void DeleteFd(int fd);
    //返回fd
    std::vector<int> Wait();
    virtual ~JEpoll();
private:
    int epollHandler;
    int maxFdCount;
    struct epoll_event* pEvents;
};

#endif	/* JEPOLL_H */

